﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GreenPepperTest {


    public class MarbleBox {
        private ICollection<Marble> marbles;

        internal ICollection<Marble> Marbles {
            get {
                return marbles;
            }
        }

        internal MarbleBox() {
            marbles = new List<Marble>();
        }

        internal void AddMarble(Marble marble) {
            Marbles.Add(marble);
        }

        internal int GetAmountOfMarbles() {
            return Marbles.Count;
        }

        internal MarbleValue GetTotalValue() {
            MarbleValue totalValue = new MarbleValue(0);

            foreach (Marble m in Marbles) {
                totalValue.Value += m.Value.Value;
            }

            return totalValue;
        }
        
    }


}
